package com.taijihuabao.modules.mapper;

import com.taijihuabao.modules.entity.ApprovalBusinessEntity;
import com.taijihuabao.modules.model.basedto.PageDTO;

import java.util.List;

/**
 * 审批业务管理
 * @author wang
 */
public interface ApprovalBusinessMapper {
    /**
     * 申请列表
     * @param pageDTO
     * @return
     */
    List<ApprovalBusinessEntity> selectList(PageDTO pageDTO);

    /**
     * 根据业务id查询单个申请
     * @param businessId
     * @return
     */
    ApprovalBusinessEntity selectOne(String businessId);

    /**
     * 根据申请编码查询单个申请
     * @param applyCode
     * @return
     */
    ApprovalBusinessEntity selectByApplyCode(String applyCode);

    /**
     * 根据id查申请
     * @param id
     * @return
     */
    ApprovalBusinessEntity selectById(Long id);

    /**
     * 查询个人单个类型的申请单
     * @param approvalBusinessEntity
     * @return
     */
    List<ApprovalBusinessEntity> selectByUserIdAndApplyType(ApprovalBusinessEntity approvalBusinessEntity);

    /**
     * 新增申请
     * @param approvalBusinessEntity
     * @return
     */
    void insertApprovalBusiness(ApprovalBusinessEntity approvalBusinessEntity);

    /**
     * 修改申请
     * @param approvalBusinessEntity
     */
    void updateApprovalBusiness(ApprovalBusinessEntity approvalBusinessEntity);

    /**
     * 删除申请
     * @param approvalBusinessEntity
     */
    void deleteApprovalBusiness(ApprovalBusinessEntity approvalBusinessEntity);
}
